﻿#ifndef __SS_TIMER_THREAD_H__
#define __SS_TIMER_THREAD_H__
#include "../../thread/ssThreadBase.h"
#include "../../thread/threadLock/ssThreadLock.h"
#include "./ssDateTimer.h"

namespace StarSeeker
{

class ssTimerThread : protected ssDateTimer, public ssThreadBase
{
public:
	ssTimerThread();
	~ssTimerThread();
	//启动半点计时器
	void StartHalfHourTimer();
	//添加计时器
	u32 AddNewTimer(u32 msgType, u64 timestamp, u32 interval, ulint p1, ulint p2);
	u32 AddNewTimer(u32 msgType, u32 interval, ulint param1, ulint param2);
	//删除计时器
	void DeleteTimer(u32 timerId);
	//停止线程
	void ExitThread();
	//当前任务数
	ulint GetTimerCount();
protected:
	virtual void ThreadMemberFunc();

protected:
	ssThreadLock			m_mutex;		//互斥量
};

}
#endif
